package git.etl;

import java.util.List;

public class TableTransportJob
{
	String objName;
	int errCode;
	StringBuffer errMsg;
	List colList;
	String srcObjName;
	int rows;
	
	public TableTransportJob(String objName)
	{
		this.objName = objName;
		this.errMsg = new StringBuffer();
	}
	
	public int getErrCode() {
		return errCode;
	}

	public void setErrCode(int errCode) {
		this.errCode = errCode;
	}

	public String getErrMsg() {
		return errMsg.toString();
	}

	public void setErrMsg(String errMsg) {
		this.errMsg = new StringBuffer(errMsg);
	}

	public String getObjName() {
		return objName;
	}

	public void setObjName(String objName) {
		this.objName = objName;
	}
	
	public StringBuffer appendMsg(Object obj)
	{
		return this.errMsg.append(obj);
	}

	public List getColList() {
		return colList;
	}

	public void setColList(List colList) {
		this.colList = colList;
	}

	public String getSrcObjName() {
		return srcObjName;
	}

	public void setSrcObjName(String srcObjName) {
		this.srcObjName = srcObjName;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}
	
	public String toString()
	{
		StringBuffer buff = new StringBuffer();
		buff.append("{").append(0 == errCode ? "Succeeded" : "Failed")
		.append(",").append(getObjName())
		.append(",").append(getErrCode())
		.append(",").append(getRows())
		.append(",").append(getErrMsg())
		.append("}");
		
		return buff.toString();
	}
}
